ds_priority_delete_min(id);
参数 | 描述 |
---|---|
id | 要使用的优先级队列的id。 |
返回: 实数或字符串
此函数将返回队列中具有最低优先级的值,然后从数据结构中删除值(它的优先级也将消失)。如果多个值具有相同的优先级,则将删除第一个添加到此优先队列的值,但具有相同优先级的所有其他值仍将在队列中。
if ai_move
{
script_execute(ds_priority_delete_min(ai_priority));
}
The above code checks an instance variable and if it returns true it will execute a script indexed in the priority queue with the lowest priority value and then remove that script from the queue.